const initState=100
export default function personReducer(preState=initState,action) {
    const {type,data}=action
    console.log(type,data)
    switch (type) {
        case 'add':
            return preState+data
        default:
            return preState

    }
}